Selerix Developer Tools
Item Property (SafeDictionary<TKey,TValue>)






Selerix.Foundation Assembly > Selerix.Foundation.Data Namespace > SafeDictionary<TKey,TValue> Class : Item Property
Gets or sets the value associated with the specified key.
Syntax
'Declaration
 
Public Shadows Default Property Item( _
   ByVal key As TKey _
) As TValue
'Usage
 
Dim instance As SafeDictionary(Of TKey,TValue)
Dim key As TKey
Dim value As TValue
 
instance.Item(key) = value
 
value = instance.Item(key)
public new TValue this[ 
   TKey key
]; {get; set;}
public  this: : TValue;[ 
    key: TKey
]; read-write
public hide  this[ 
   key : TKey
] get,set : TValue
public: __property new TValue* get_Item   TKey* key
;
public: __property new void set_Item   TKey* key,
   TValue* value
;
public:
new property TValue^ default [TKey^] {
   TValue^ get(TKey^ key);
   void set (TKey^ key, TValue^ value);
}

Parameters

key

Property Value

The value associated with the specified key. If the specified key is not found, a get operation throws a System.Collections.Generic.KeyNotFoundException, and a set operation creates a new element with the specified key.
Exceptions
ExceptionDescription
key is null.
The property is retrieved and key does not exist in the collection.
See Also

Reference

SafeDictionary<TKey,TValue> Class
SafeDictionary<TKey,TValue> Members